<template>
    <div class="image-data">
        <div class="panel">
            <div class="panel-header">
                影像资料信息
            </div>
            <div class="panel-body">
                <lg-preview id="lgPreviewImg"></lg-preview>
                <ul>
                    <li>
                        <div class="text">手术知情同意书：<span v-if="!contract_i_d.product_pic_one">无</span></div>
                        <div class="img">
                            <img v-preview="contract_i_d.product_pic_one" v-bind:src="contract_i_d.product_pic_one"  v-if='contract_i_d.product_pic_one' alt="">
                            <img v-preview="contract_i_d.product_pic_two" v-bind:src="contract_i_d.product_pic_two" alt=""  v-if='contract_i_d.product_pic_two'>
                            <img v-preview="contract_i_d.product_pic_three" v-bind:src="contract_i_d.product_pic_three" alt=""  v-if='contract_i_d.product_pic_three'>
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            身份证正面：<span v-if='!contract_i_d.id_card_pic_front' >无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.id_card_pic_front" v-bind:src="contract_i_d.id_card_pic_front"  v-if='contract_i_d.id_card_pic_front' alt="">
                            <img v-preview="contract_i_d.id_card_pic_con" v-bind:src="contract_i_d.id_card_pic_con"  v-if='contract_i_d.id_card_pic_con' alt="">
                        </div>
                    </li>

                    <li>
                        <div class="text">
                            手持身份证/与金融顾问合影：<span v-if='!contract_i_d.cert_hand_pic'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.cert_hand_pic" v-bind:src="contract_i_d.cert_hand_pic"  v-if='contract_i_d.cert_hand_pic' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            门店名称：<span>无</span>
                        </div>
                        <div class="img"></div>
                    </li>
                    <li>
                        <div class="text">
                            银行卡正面：<span v-if='!contract_i_d.bank_pic_front'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.bank_pic_front" v-bind:src="contract_i_d.bank_pic_front"  v-if='contract_i_d.bank_pic_front' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            行驶证：<span v-if='!contract_i_d.driving_licence_pic1'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.driving_licence_pic1" v-bind:src="contract_i_d.driving_licence_pic1"  v-if='contract_i_d.driving_licence_pic1' alt="">
                            <img v-preview="contract_i_d.driving_licence_pic2" v-bind:src="contract_i_d.driving_licence_pic2"  v-if='contract_i_d.driving_licence_pic2' alt="">
                            <img v-preview="contract_i_d.driving_licence_pic3" v-bind:src="contract_i_d.driving_licence_pic3"  v-if='contract_i_d.driving_licence_pic3' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text"> 芝麻信用评分截图：<span v-if='!contract_i_d.sesame_credit_pic'>无</span></div>
                        <div class="img">
                            <img v-preview="contract_i_d.sesame_credit_pic" v-bind:src="contract_i_d.sesame_credit_pic"  v-if='contract_i_d.sesame_credit_pic' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            其他资产证明：<span  v-if='!contract_i_d.other_pic1'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.other_pic1" v-bind:src="contract_i_d.other_pic1"  v-if='contract_i_d.other_pic1' alt="">
                            <img v-preview="contract_i_d.other_pic2" v-bind:src="contract_i_d.other_pic2"  v-if='contract_i_d.other_pic2' alt="">
                            <img v-preview="contract_i_d.other_pic3" v-bind:src="contract_i_d.other_pic3"  v-if='contract_i_d.other_pic3' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            工卡/名片：<span v-if='!contract_i_d.work_pic'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.work_pic" v-bind:src="contract_i_d.work_pic"  v-if='contract_i_d.work_pic' alt="">
                        </div>
                        </li>
                    <li>
                        <div class="text">
                            护照：<span v-if='!contract_i_d.passport_pic1'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.passport_pic1" v-bind:src="contract_i_d.passport_pic1"  v-if='contract_i_d.passport_pic1' alt="">
                            <img v-preview="contract_i_d.passport_pic2" v-bind:src="contract_i_d.passport_pic2"  v-if='contract_i_d.passport_pic2' alt="">
                            <img v-preview="contract_i_d.passport_pic3" v-bind:src="contract_i_d.passport_pic3"  v-if='contract_i_d.passport_pic3' alt="">
                        </div>
                    </li>
                    <li>
                        <div class="text">
                            反欺诈风险提示函：<span v-if='!contract_i_d.anti_fraud_risk_pic'>无</span>
                        </div>
                        <div class="img">
                            <img v-preview="contract_i_d.anti_fraud_risk_pic" v-bind:src="contract_i_d.anti_fraud_risk_pic"  v-if='contract_i_d.anti_fraud_risk_pic' alt="">
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</template>
<script>
    import {mapState} from "vuex"
    export default {
        name:'orderImage',
        data: function () {
            return {
                contract_no: this.$route.params.contract_no,
                oid: this.$route.params.oid
                /*contract_i_d:{
                    product_pic_one:'http://h.hiphotos.baidu.com/image/h%3D300/sign=7e74fc06cacec3fd943ea175e689d4b6/1f178a82b9014a9031654777a0773912b21beea5.jpg'
                }*/
            }
        },
        computed: mapState({
                    contract_i_d: state => state.order.contract_i_d
        }),
        created(){
            this.$store.dispatch({
                type:this.oid?'uncommittedContractImage':'contractImageDetail',
                contract_no:this.contract_no,
                oid:this.oid
            })
        },

        }
</script>